package com.jic.interaction.JDVOP.model.vo.request.order;

import com.jic.interaction.JDVOP.model.enyity.order.Sku;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

/**
 * @ClassName OrderSubmit
 * TODO
 * @Description 订单提交
 * @Author chenhongfeng
 * @Date 2020/11/15 16:48
 * @Version 1.0
 **/
@Data
@ApiModel(description = "订单提交")
public class OrderSubmitRequest {

    @ApiModelProperty(notes = "授权时获取的access token")
    private String token;
    @ApiModelProperty(notes = "第三方的订单单号，必须在100字符以内")
    private String thirdOrder;
    /**
     * 下单商品信息
     * Json数组类型的字符串，参数格式：[{"skuId":商品编号, "num":商品数量, "price":100,"bNeedGift":true, "yanbao":[{"skuId":商品编号}]}]
     * (最高支持50种商品)
     */
    @ApiModelProperty(notes = "下单商品信息")
    private Sku sku;
    @ApiModelProperty(notes = "收货人姓名")
    private String name;
    @ApiModelProperty(notes = "一级地址编码：收货人省份地址编码")
    private Integer province;
    @ApiModelProperty(notes = "二级地址编码：收货人市级地址编码")
    private Integer city;
    @ApiModelProperty(notes = "三级地址编码：收货人县（区）级地址编码")

    private Integer county;
    @ApiModelProperty(notes = "四级地址编码：收货人乡镇地址编码(如果该地区有四级地址，则必须传递四级地址，没有四级地址则传0)")
    private Integer town;
    @ApiModelProperty(notes = "收货人详细地址，最多100个字符")
    private String address;
    @ApiModelProperty(notes = "邮编，最多20个字符")
    private String zip;
    @ApiModelProperty(notes = "座机号，最多20个字符")
    private String phone;
    @ApiModelProperty(notes = "手机号，最多20个字符")
    private String mobile;
    @ApiModelProperty(notes = "邮箱")
    private String email;
    /**
     * 注意
     * 支付明细，
     * 当paymentType为20时候必须递此字段
     * flag为区分字段
     * 枚举：1 为个人，2为企业
     * paymentType为 支付类型
     * 枚举定义：
     * 17, "微信支付"
     * 101, "金采支付",
     * 4,“预存款”
     * payMoney为支付金额 details
     * 单位：元
     * [
     *     {
     *         "payMoney":20,
     *         "paymentType":"17",
     *         "flag":"1"
     *     },
     *     {
     *         "payMoney":80,
     *         "paymentType":"4",
     *         "flag":"2"
     *     }
     * ]
     */
    @ApiModelProperty(notes = "支付明细，")
    private String payDetails;
    @ApiModelProperty(notes = "备注（少于100字）")
    private String remark;
    @ApiModelProperty(notes = "开票方式(2为集中开票，4 订单完成后开票)")
    private Integer invoiceState;
    /**
     * 当发票类型为2时，开票方式只支持2集中开票
     */
    @ApiModelProperty(notes = "发票类型（2增值税专用发票；3 电子票）")
    private Integer invoiceType;
    @ApiModelProperty(notes = "发票类型：4：个人，5：单位")
    private Integer selectedInvoiceTitle;
    @ApiModelProperty(notes = "发票抬头  (如果selectedInvoiceTitle=5则此字段必须)")
    private String companyName;
    /**
     * 备注:若增值税专用发票则只能选1 明细
     */
    @ApiModelProperty(notes = "1:明细，100：大类")
    private Integer invoiceContent;
    @ApiModelProperty(notes = "支付方式枚举值\n" +
            "1：货到付款\n" +
            "4：预存款\n" +
            "5：公司转账\n" +
            "101：京东金采\n" +
            "102：商城金采(一般不适用，仅限确认开通商城账期的特殊情况使用，请与业务确认后使用)\n" +
            "20为混合支付\n")
    private Integer paymentType;
    @ApiModelProperty(notes = "使用余额paymentType=4时，此值固定是1   其他支付方式0")
    private Integer isUseBalance;
    @ApiModelProperty(notes = "是否预占库存，0是预占库存（需要调用确认订单接口），1是不预占库存")
    private Integer submitState;
    @ApiModelProperty(notes = "增专票收票人姓名")
    private String invoiceName;
    @ApiModelProperty(notes = "收票人电话")
    private String invoicePhone;
    @ApiModelProperty(notes = "增专票收票人所在省(京东地址编码)")
    private Integer invoiceProvice;
    /**
     * (京东地址编码)
     * 当invoiceType =2时，该字段必填。
     */
    @ApiModelProperty(notes = "增专票收票人所在市")
    private Integer invoiceCity;

    @ApiModelProperty(notes = "增专票收票人所在区")
    private Integer invoiceCounty;

    @ApiModelProperty(notes = "增专票收票人所在地址当invoiceType =2时，该字段必填。")
    private String invoiceAddress;
    @ApiModelProperty(notes = "专票资质公司名称")
    private String regCompanyName;

    @ApiModelProperty(notes = "专票资质纳税人识别号")
    private String regCode;
    @ApiModelProperty(notes = "专票资质注册地址")
    private String regAddr;

    @ApiModelProperty(notes = "专票资质注册电话")
    private String regPhone;

    @ApiModelProperty(notes = "专票资质注册银行")
    private String regBank;

    @ApiModelProperty(notes = "专票资质银行账号")
    private String regBankAccount;
    /**
     * 大家电配送日期：默认值为-1，0表示当天，1表示明天，2：表示后天; 如果为-1表示不使用大家电预约日历
     */
    @ApiModelProperty(notes = "大家电配送日期")
    private Integer reservingDate;
    /**
     * 大家电安装日期：默认按-1处理，0表示当天，1表示明天，2：表示后天
     */
    @ApiModelProperty(notes = "大家电安装日期")
    private Integer installDate;
    /**
     * 是否选择了安装，默认为true，选择了“暂缓安装”，此为必填项，必填值为false。
     */
    @ApiModelProperty(notes = "是否选择了安装")
    private boolean needInstall;
    @ApiModelProperty(notes = "中小件配送预约日期  格式：yyyy-MM-dd")
    private String promiseDate;
    @ApiModelProperty(notes = "中小件配送预约时间段 时间段如： 9:00-15:00")
    private String promiseTimeRange;
    @ApiModelProperty(notes = "中小件预约时间段的标记")
    private Integer promiseTimeRangeCode;
    @ApiModelProperty(notes = "家电配送预约日期，格式：yyyy-MM-dd")
    private String reservedDateStr;
    @ApiModelProperty(notes = "大家电配送预约时间段，如果：9:00-15:00")
    private String reservedTimeRange;
    /**
     * 环日历, 客户传入最近一周可配送的时间段,客户入参:{"3": "09:00-10:00,12:00-19:00","4": "09:00-15:00"}
     */
    @ApiModelProperty(notes = "环日历")
    private String cycleCalendar;
    @ApiModelProperty(notes = "采购单号，长度范围[1-26]")
    private String poNo;
    @ApiModelProperty(notes = "节假日不可配送，默认值为false，表示节假日可以配送，为true表示节假日不配送")
    private boolean validHolidayVocation;
    @ApiModelProperty(notes = "第三方平台采购人账号")
    private String thrPurchaserAccount;
    @ApiModelProperty(notes = "第三方平台采购人姓名")
    private String thrPurchaserName;
    @ApiModelProperty(notes = "第三方采购人电话（手机号，固定电话区号+号码）")
    private String thrPurchaserPhone;



}
